<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function Father(money,house){
      this.money = money
      this.house = house
    }
    Father.prototype.hight=function(){
      console.log('185');
    }
     const f=new Father(1000000,20)
     console.log(f);
     f.hight()
     function Son(){

     }

     Son.prototype=new Father()
     //把构造函数指向自己
     Son.prototype.constructor=Son

     console.log(Son.prototype);
     new Son().hight()

     //把父级的实例化对象给子级的原型对象
     //再把子级的constructor重新指向自己的构造函数
  </script>
</body>

</html>